package com.ydcycloud.sys.model;

/**
 * <b>Description:登陆时间对象</b><br>
 * @author 唐海洋
 * @version 1.0 2016-9-15 下午12:12:04
 */
public class SessionLoginTime {
	
	public static final String SESSION_LOGIN_TIME="session_login_time";
 	
	private long beginTime;			//开始时间
	private long lastAccessTime;	//最后一次访问时间

	public SessionLoginTime(long beginTime) {
		this.beginTime = beginTime;
	}

	public void setLastAccessTime(long lastAccessTime) {
		this.lastAccessTime = lastAccessTime;
	}
	
	/**
	 * Description:获取持续时间
	 * @author 唐海洋
	 * @Version 1.0 2016-9-15下午12:14:32 
	 * @return
	 */
	public long getDurationTime() {
		return lastAccessTime-beginTime;
	}
}
